/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.ranch.dao.impl;


import org.hibernate.Criteria;
import org.ranch.dao.FarmDAO;
import org.ranch.model.Farm;
import org.ranch.model.Kraal;
import org.springframework.stereotype.Repository;

/**
 *  Implements the {@link FarmDAO} interface to provide CRUD operations for the
 * {@link User} object using hibernate as the ORM stragety
 */
@Repository("farmDAO")
public class HibernateFarmDAOImpl extends BaseDAOImpl<Farm> implements FarmDAO{

    @Override
    public Kraal searchWithParams(String query, Integer pageNo, int pageSize) {
	/*Criteria criteria = buildCriteria(query);
	criteria.setFirstResult((pageNo - 1) * pageSize);
	criteria.setMaxResults(pageSize);*/
	
	///Criteria c  = SESS
	return null;
    }
    
    /**
     * @param query
     * @return
     */
    @SuppressWarnings("unused")
    private Criteria buildCriteria(String query) {
	// TODO Auto-generated method stub
	return null;
    }

}
